﻿using System;
using System.Data;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using DTcms.Common;

namespace DTcms.Web.admin.users
{
    public partial class user_show : Web.UI.ManagePage
    {
        public int isshow = 0;
        private int id = 0;
        protected Model.users model = new Model.users();
        protected void Page_Load(object sender, EventArgs e)
        {
            //获取管理员信息 20190116
            Model.manager admin = GetAdminInfo();
          
            if (admin != null) {
                if (admin.role_id == 1) { btnUpgrade.Visible = true; btnReadcount.Visible = true; }
            }

            this.id = DTRequest.GetQueryInt("id");
            if (this.id == 0)
            {
                JscriptMsg("传输参数不正确！", "back");
                return;
            }
            if (!new BLL.users().Exists(this.id))
            {
                JscriptMsg("信息不存在或已被删除！", "back");
                return;
            }
            if (!Page.IsPostBack)
            {
                BLL.users bll = new BLL.users();
                model = bll.GetModel(this.id);
                if (model != null) {
                    if (model.group_id == 1) { btnReadcount.Visible = false; }
                }
            }
        }
    }
}